<?php
require_once("config.php");
$mid=0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

	<div id="contents"></div>
	<input type="hidden" name="mid" id="hide_mid" value="<?php echo $mid;?>" />
	 <div id="end" style="width:400px;display:none;clear:both;"></div>
  <script type="text/javascript">
		function showmsg(){
			mids=$("#hide_mid").val();
			$.post("chat/ajax.php?act=display",
				   {mid:mids},
				   function(data){
						$("#hide_mid").val(data.mid);
						if(data.list!=0){
							for(i=0;i<data.list.length;i++){
								$("#contents").append("<br /><br /><span class='blue'>"+data.list[i].user+"</span>: <span class='blue'>"+data.list[i].time1+"</span><br>&nbsp;&nbsp;"+data.list[i].msg);
								sc();
								document.getElementById('chat_content').scrollTop=10000;
							}
						}
				   },"json");
			}
		function scrollWindow() {scroll(0, 100000); } 
		showmsg();
		setInterval("showmsg()", 4000); 
  </script>
